<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>作业1</title>
</head>
<body>
    <script src="vue.js"></script>
    <div id="app">
        <input type="text" v-model:name="inputeValue">
        <button @click="btnClick">点击</button>
        <p>{{message}}</p>
    </div>

    <script>
        var app = new Vue({
            el:'#app',
            data:{
                message:"",
                inputeValue:""
            },
            methods:{
                btnClick(){
                    this.message = this.inputeValue;
                    this.inputeValue = ""
                }
            }
        })
    </script>
</body>
</html> 